﻿using System;
using System.ComponentModel;
using OpenQuant.API;

namespace OpenQuant.Quik
{
    public class SecurityProxy
    {
        [Category("Main")]
        [Description("Полное название инструмента Quik")]
        public string FullName { get; set; }
        [Category("Main")]
        [Description("Краткое название инструмента Quik")]
        public string ShortName { get; set; }
        [ReadOnly(true)]
        [Category("Appearance (alternative)")]
        [Description("Instrument alternative exchange")]
        public string AltExchange { get; set; }
        [ReadOnly(true)]
        [Category("Appearance (alternative)")]
        [Description("Alternative source of instrument definition (provider name)")]
        public string AltSource { get; set; }
        [ReadOnly(true)]
        [Description("Instrument alternative symbol")]
        [Category("Appearance (alternative)")]
        public string AltSymbol { get; set; }
        [Description("Instrument currency code (USD, EUR, RUR, CAD, etc.)")]
        [Category("Appearance")]
        public string Currency { get; set; }
        [Description("Instrument description")]
        [Category("Appearance")]
        public string Description { get; set; }
        [Category("Appearance")]
        [Description("Instrument exchange")]
        public string Exchange { get; set; }
        [Description("Contract Value Factor by which price must be adjusted to determine the true nominal value of one futures/options contract. (Qty * Price) * Factor = Nominal Value")]
        [Category("Derivative")]
        public double Factor { get; set; }
        [Category("Industry")]
        [Description("Industry group")]
        public string Group { get; set; }
        [Category("Margin")]
        [Description("Initial margin (simulations)")]
        public double Margin { get; set; }
        [Description("Instrument maturity")]
        [Category("Derivative")]
        public DateTime Maturity { get; set; }
        [Description("C# price format string (example: F4 - show four decimal numbers for Forex contracts)")]
        [Category("Display")]
        public string PriceFormat { get; set; }
        [Description("Option type : put or call")]
        [Category("Derivative")]
        public PutCall PutCall { get; set; }
        [Category("Industry")]
        [Description("Industry sector")]
        public string Sector { get; set; }
        [Category("Derivative")]
        [Description("Instrument strike price")]
        public double Strike { get; set; }
        [Category("Appearance")]
        [Description("Instrument symbol")]
        public string Symbol { get; set; }
        public double TickSize { get; set; }
        [Description("Instrument Type (Stock, Futures, Option, Bond, ETF, Index, etc.)")]
        [Category("Appearance")]
        public InstrumentType Type { get; set; }

        public override string ToString()
        {
            return ShortName;
        }
    }
}
